﻿using RepositoryDefinition;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RepositoryImplementation
{
    public class SectionRepository:ISectionRepository
    {
        public List<ForumDomainModels.Section> GetAllSections()
        {
            try
            {
                ForumDAL.SectionDAL sectionContext = new ForumDAL.SectionDAL();
                List<ForumDomainModels.Section> sections = sectionContext.GetAllSections();
                return sections;
            }
            catch (ForumDAL.CustomExceptions.NoRowsRetrieved e)
            {
                return null;
            }
        }
    }
}
